package model.commands.turtlequeries;

import model.Environment;
import model.SyntaxErrorException;
import model.commands.Command;

/**
 * Name:
 * PENDOWN?
 * PENDOWNP
 * 
 * Description:
 * returns 1 if turtle's pen is down, 0 if it is up
 *
 * @author Erick Gonzalez
 */
public class PenDownCommand extends Command {

    @Override
    public int evaluate (Environment e) throws SyntaxErrorException {
        return e.invokeCommandableMethod(Environment.GET_PEN_STATE).getPenState();
    }

}
